{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Robust linear regression\n",
    "### Dr. Tirthajyoti Sarkar, Fremont, CA 94536\n",
    "\n",
    "In this notebook, we demonstrate `HuberRegressor` class from scikit-learn which is robust to outliers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "from sklearn.linear_model import HuberRegressor, LinearRegression\n",
    "from sklearn.datasets import make_regression\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Creating a regression problem using `make_regression` method"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "rng = np.random.RandomState(0)\n",
    "\n",
    "X, y, coef = make_regression(\n",
    "    n_samples=200, n_features=2, noise=4.0, \n",
    "    coef=True, random_state=0\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlgAAADCCAYAAACVBLzQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO2dfZAc5X3nv8+MRmgkYc0SFIEGYZEUJx1EkfZQYc66ulqRGOGzwRuIAxROXE7uuNQ53KGitrwEyhI+XNo62efUpVJXR4jPuTKHBMhZg8WdSBBbuegCDmJXloW1BzHmZQSyYjQboR15R7PP/bHTo56e5+l++m26e+b7qVJpp6en+5mefr79e57n9yKklCCEEEIIIdGRS7oBhBBCCCG9Bg0sQgghhJCIoYFFCCGEEBIxNLAIIYQQQiKGBhYhhBBCSMTQwCKE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BlDXukrSusYlwoAIIW4G8CUAt0opZ5NuTw/ydwCuFkJcJYRYDOBOAM8k3KaeRAghAPwZgB9JKf9z0u3pBYQQV9te3grgeFJt8QN1LXaoa10iDbrGRKMBEUK8AeAiAD9rbnpJSvn7CTbJCCHEbwD4YwArAVQBTEkptyXbKjVCiH8F4I8A5AF8U0r51YSb5IkQ4gkAQ1io4H4SwA4p5Z8l2igPhBD/AsD/AXAUwHxz8x9KKZ9LrlXZRgixD8A6LFzPtwD8vpSykmyrvMmirmVJ0wDqWrdIg67RwCKEEEIIiRguERJCCCGERAwNLEIIIYSQiKGBRQghhBASMTSwCCGEEEIihgYWIYQQQkjE0MAihBBCCIkYGliEEEIIIRFDA4sQQgghJGL+P9plRqb/0gZjAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 720x216 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fix, ax = plt.subplots(1,2,figsize=(10,3))\n",
    "ax[0].scatter(X[:,0],y)\n",
    "ax[0].grid(True)\n",
    "ax[1].scatter(X[:,1],y)\n",
    "ax[1].grid(True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Inserting random outliers in the data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "X[:4] = rng.uniform(10, 20, (4, 2))\n",
    "y[:4] = rng.uniform(100, 200, 4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot to show the inserted outliers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAADCCAYAAADny95mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4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AABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x216 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fix, ax = plt.subplots(1,2,figsize=(10,3))\n",
    "ax[0].scatter(X[:,0],y)\n",
    "ax[0].grid(True)\n",
    "ax[1].scatter(X[:,1],y)\n",
    "ax[1].grid(True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Create a `HuberRegressor` object and fit\n",
    "\n",
    "The Huber Regressor optimizes the squared loss for the samples where $|\\frac{y - X'w}{\\sigma}| < \\epsilon$ and the absolute loss for the samples where $|\\frac{y - X'w}{\\sigma}| < \\epsilon$, where $w$ and $\\sigma$ are parameters to be optimized. \n",
    "\n",
    "The parameter $\\sigma$ makes sure that if $y$ is scaled up or down by a certain factor, one does not need to rescale epsilon to achieve the same robustness. Note that this does not take into account the fact that the different features of $X$ may be of different scales."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "huber = HuberRegressor()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "HuberRegressor(alpha=0.0001, epsilon=1.35, fit_intercept=True, max_iter=100,\n",
       "               tol=1e-05, warm_start=False)"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "huber.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[16.02763376, 15.44883183]])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X[1].reshape(1,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([763.50484115])"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "huber.predict(X[1].reshape(1,-1))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### A simple linear regression fit for comparison"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "linear = LinearRegression()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None, normalize=False)"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "linear.fit(X, y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Compare the estimated coefficients\n",
    "\n",
    "As we will see, the Huber regressor estimates the coefficients, in the presence of outliers, far better (closer to the true values) than a simple linear model."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True coefficients: [20.4923687  34.16981149]\n",
      "Huber coefficients: [17.79064226 31.01065329]\n",
      "Linear Regression coefficients: [ 3.63326689 10.82594129]\n"
     ]
    }
   ],
   "source": [
    "print(\"True coefficients:\", coef)\n",
    "print(\"Huber coefficients:\", huber.coef_)\n",
    "print(\"Linear Regression coefficients:\", linear.coef_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAvcAAADUCAYAAAAY2AwKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3debRkVXn38e/PZhIUBEFs0dgaUV9Rg4pE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D5n2re17QMWYZyLql2BhwJntnjOo135rH23Tmt95VHAxovgvZ8t1m+0Nj0P+HfaFXXmuvkfaiVJkqSecFqOJEmS1BMm95IkSVJPmNxLkiRJPWFyL0mSJPWEyb0kSZLUEyb3kiRJUk+Y3EuSJEk9YabB824AAAANSURBVHIvSZIk9cT/B4NHjIBsNm8wAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 864x216 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fix, ax = plt.subplots(1,2,figsize=(12,3),sharey=True)\n",
    "ax[0].barh(['True coef','Huber coef', 'Linear fit coef'],width=[coef[0],huber.coef_[0],linear.coef_[0]])\n",
    "ax[0].set_title(\"1st coefficients\",fontsize=15)\n",
    "ax[1].barh(['True coef','Huber coef', 'Linear fit coef'],width=[coef[1],huber.coef_[1],linear.coef_[1]])\n",
    "ax[1].set_title(\"2nd coefficients\",fontsize=15)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  },
  "latex_envs": {
   "LaTeX_envs_menu_present": true,
   "autoclose": false,
   "autocomplete": true,
   "bibliofile": "biblio.bib",
   "cite_by": "apalike",
   "current_citInitial": 1,
   "eqLabelWithNumbers": true,
   "eqNumInitial": 1,
   "hotkeys": {
    "equation": "Ctrl-E",
    "itemize": "Ctrl-I"
   },
   "labels_anchors": false,
   "latex_user_defs": false,
   "report_style_numbering": false,
   "user_envs_cfg": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
